package day07;

import java.util.Scanner;

public class Guessing {
    /*public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
        int a =(int) (Math.random()*1000+1);
        System.out.println(a);
        while (true){
            System.out.println("c");
            int b=scan.nextInt();
            if(a>b){
                System.out.println("x");
            }else if(b>a){
                System.out.println("d");
            }else{
                System.out.println("duile");
                break;
            }
        }
    }*/
    /*public static void main(String[] args) {
        Scanner scan=new Scanner(System.in);
        int a =(int )(Math.random()*1000+1);
        System.out.println(a);
        while (true){
            System.out.println("猜");
            int b=scan.nextInt();
            if(a>b){
                System.out.println("小");
            }else if(b>a){
                System.out.println("大");
            }else{
                System.out.println("恭喜你");
                break;
            }
        }

    }*/
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);
        int a = (int) (Math.random() * 1000 + 1);
        System.out.println();
        while (true) {
            System.out.println("猜吧");
            int b = scan.nextInt();
            if (a > b) {
                System.out.println("小了");
            } else if (b > a) {
                System.out.println("大了");
            } else {
                System.out.println("猜对了");
                break;

            }
        }
    }
}
